package ${basepackage}.dao.${module};

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import ${basepackage}.entity.${module}.${table.className};
import com.masget.command.dao.MyBatisRepository;
import com.masget.command.utils.QueryWrapperUtils.QueryWrapper;

/**
 * <b>function:</b> ${table.remarks!} MyBatis数据库操作
 * @author ${author}
 * @createDate <#if now??>${now?string('yyyy-MM-dd HH:mm:ss')}</#if>
 * @file ${table.className}Dao.java
 * @package ${basepackage}.dao.${module}
 * @project ${app}
 * @blog ${blog}
 * @email ${email}
 * @version 1.0
 */
@Repository
@MyBatisRepository
public interface ${table.className}Dao<T extends ${table.className}> {

	public int add(T entity) throws Exception;
	
	public int batch(List<T> entity) throws Exception;
	
	public int edit(T entity) throws Exception;
	
	public int remove(T entity) throws Exception;
	
	public Long count(@Param("conditions") T entity) throws Exception;

	public List<T> query(@Param("conditions") T entity, @Param("wrapper") QueryWrapper wrapper) throws Exception;
	
	public T get(T entity) throws Exception;
}
